import { createBrowserRouter, Navigate } from 'react-router-dom'
import Main from '../pages/main'
import List from '../pages/list'
import Details from '../pages/blog-detail'
const routes = [
    {
        path: '/',
        element: <Navigate to={"blog"} replace />,
    },
    {
        path: '/blog',
        Component: Main,
        children: [
            {
                path: '',
                element: <Navigate to={"list"} replace />,
            },
            {
                path: 'list',
                Component: List
            },
            {
                path: 'details',
                Component: Details
            }
        ]
    },
]

export default createBrowserRouter(routes)
